Telegram Group & Telegram Channel
​​DeepGit: Экзамен

Мы разобрались с оновными основами основ в git:
Как выглядит директория git-a
Какие есть типы данных в git
Как git сохраняет версии и накатывает их
Что такое blob и как он хранит данные
Как собирается hash и архивируется текст

Давайте теперь глянем как это все собрать воедино:

- создадим репозиторий;
- добавим новый файл с текстом;
- коммит;
- добавим новый файл с другим текстом и изменения в первом файле;
- коммит.

C помощью привычного git-a выглядит следующим образом:

 git init
echo "text" >>1.txt
git add 1.txt
git commit -m "commit"
echo "text1" >> 1.txt
echo "text" >> 2.txt
git add .
git commit -m "commit 2"

Теперь как это можно сделать с помощью низкоуровневых команд git:

 git init
echo "text" >> 1.txt
git hash-object -w 1.txt
git update-index --add 1.txt
git write-tree
echo "commit" | git commit-tree <tree>
echo "text1" >> 1.txt
echo "text" >> 2.txt
git hash-object -w 1.txt
git hash-object -w 2.txt
git update-index --add 2.txt
git update-index 1.txt
git write-tree
echo "commit 2" | git commit-tree <tree> -p <pcommit>

Вот и все.
По большому счету, чтобы восстановить полностью проект достаточно иметь бекап его .git директории, в которой есть все версии и состояния проекта.

Завтра или послезавтра на @dev_quiz опубликую пару тестов по разобраному тут материалу с git-ом.
Следующее, что мы будем разбирать в git будут референсы и все, что с ними связано.

Напоминаю, если у вас остались вопросы или пожелания, можно их обсудить в нашем чате: @developer_tools_chat



tg-me.com/developer_tools/243
Create:
Last Update:

​​DeepGit: Экзамен

Мы разобрались с оновными основами основ в git:
Как выглядит директория git-a
Какие есть типы данных в git
Как git сохраняет версии и накатывает их
Что такое blob и как он хранит данные
Как собирается hash и архивируется текст

Давайте теперь глянем как это все собрать воедино:

- создадим репозиторий;
- добавим новый файл с текстом;
- коммит;
- добавим новый файл с другим текстом и изменения в первом файле;
- коммит.

C помощью привычного git-a выглядит следующим образом:

 git init
echo "text" >>1.txt
git add 1.txt
git commit -m "commit"
echo "text1" >> 1.txt
echo "text" >> 2.txt
git add .
git commit -m "commit 2"

Теперь как это можно сделать с помощью низкоуровневых команд git:

 git init
echo "text" >> 1.txt
git hash-object -w 1.txt
git update-index --add 1.txt
git write-tree
echo "commit" | git commit-tree <tree>
echo "text1" >> 1.txt
echo "text" >> 2.txt
git hash-object -w 1.txt
git hash-object -w 2.txt
git update-index --add 2.txt
git update-index 1.txt
git write-tree
echo "commit 2" | git commit-tree <tree> -p <pcommit>

Вот и все.
По большому счету, чтобы восстановить полностью проект достаточно иметь бекап его .git директории, в которой есть все версии и состояния проекта.

Завтра или послезавтра на @dev_quiz опубликую пару тестов по разобраному тут материалу с git-ом.
Следующее, что мы будем разбирать в git будут референсы и все, что с ними связано.

Напоминаю, если у вас остались вопросы или пожелания, можно их обсудить в нашем чате: @developer_tools_chat

BY Dev Tools


Warning: Undefined variable $i in /var/www/tg-me/post.php on line 283

Share with your friend now:
tg-me.com/developer_tools/243

View MORE
Open in Telegram


Dev Tools Telegram | DID YOU KNOW?

Date: |

Telegram Auto-Delete Messages in Any Chat

Some messages aren’t supposed to last forever. There are some Telegram groups and conversations where it’s best if messages are automatically deleted in a day or a week. Here’s how to auto-delete messages in any Telegram chat. You can enable the auto-delete feature on a per-chat basis. It works for both one-on-one conversations and group chats. Previously, you needed to use the Secret Chat feature to automatically delete messages after a set time. At the time of writing, you can choose to automatically delete messages after a day or a week. Telegram starts the timer once they are sent, not after they are read. This won’t affect the messages that were sent before enabling the feature.

China’s stock markets are some of the largest in the world, with total market capitalization reaching RMB 79 trillion (US$12.2 trillion) in 2020. China’s stock markets are seen as a crucial tool for driving economic growth, in particular for financing the country’s rapidly growing high-tech sectors.Although traditionally closed off to overseas investors, China’s financial markets have gradually been loosening restrictions over the past couple of decades. At the same time, reforms have sought to make it easier for Chinese companies to list on onshore stock exchanges, and new programs have been launched in attempts to lure some of China’s most coveted overseas-listed companies back to the country.

Dev Tools from ar


Telegram Dev Tools
FROM USA